<template>
	<el-dialog
		v-elDragDialog
		:visible.sync="dialogVisible"
		append-to-body
		fullscreen
		:show-close="false"
		:close-on-press-escape="false"
		:close-on-click-modal="false"
		custom-class="pagePopVideo"
		:before-close="handleClose"
	>
		
	</el-dialog>
</template>

<script>
import elDragDialog from '@/directives/el-drag-dialog'; // base on element-ui
export default {
	components: {},
	props: {
		title: {
			type: String,
			default: ''
		},
		info: {
			type: Object,
			default: () => {
				return {};
			}
		}
	},
	name: 'pagePopVideo',
	data() {
		return {
			dialogVisible: false,
			sub_load: false,
			userinfo: this.info,
			form: {},
			itemInfo:{}
		};
	},
	computed: {},
	watch: {
		info: {
			handler(val) {
				this.userinfo = {
					...val
				};
			},
			immediate: true
		}
	},
	created() {},
	methods: {
		init(data) {
			this.dialogVisible = true;
			if (data) {
				console.log({ ...data }, '----data');
				this.itemInfo = { ...data };
				this.title = `${this.itemInfo.name}检测`
			}
			this.$nextTick(() => {});
		},

		onSubmit(formName) {
			this.$refs[formName].validate((valid) => {
				if (valid) {
				}
			});
		},
		handleClose() {
			this.$emit('change');
			this.$emit('handleClose');
			this.form = {};
			this.dialogVisible = false;
		}
	},
	directives: { elDragDialog }
};
</script>

<style lang="less">
.pagePopVideo {
	// width: fit-content !important;
	// border-radius: 8px;
	overflow: hidden;
	.el-dialog__header {
		// .bor();
		// padding: 0;
	}
	.el-dialog__body {
		padding: 0;
		// max-height: 70vh;
		// overflow-y: auto;
	}
	.inner {}
}
</style>
